<template>
  <div>
    <div>账号切换</div>
    <button @click="zzjl()" type="default" size="mini">张三经理</button>
    <button @click="lisi()" type="default" size="mini">李四总经理</button>
    <button @click="wjl()" type="default" size="mini">王经理</button>
    <button @click="admin()" type="default" size="mini">admin</button>

    <div>当前token：{{ token }}</div>
  </div>
</template>

<script>
export default {
  name: "Test",

  data() {
    return {
      token: ''
    };
  },

  created(){
    this.token = window.localStorage.getItem('token')
  },

  methods: {
    wjl() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNDM3NjMwNDIx1FEqLU4t8kxRsjKCMPMSc1OBWsqzcpRqAb4pVZBAAAAA.-bW4hJ5UptFiCRsL6jVUa4XbgVwdsfVGfP8gJ-tOVbp7D3JOb8sylbBDLUhTZt6FJsYhlA5uYz8HSRck_pbaCA'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    },

    admin() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNLMwNzWwsDA21VEqLU4t8kwBikGYeYm5qUAtiSm5mXlKtQCOoQuyQgAAAA.nct5gfPAhmok4slaBEd9G2-Y0Unx8bLd4gGxfhI8dIgZaLqi61cTm0I5sPv7JQnwLCBowMQdUqkIQbqKXia_xw'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    },

    zzjl() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNLMwNzWwNDA111EqLU4t8kxRsoIy8xJzU4FaqjIS89KLE_OUagE-NzQARQAAAA.o3GXPuiPhhxYJzpkMYA-OhcgpOaf7syNhrDyU4jRD9Aw52UAK4eTOYQ9-5T8nLsa6Jx8DkzYGEY8aK7mwyjEUQ'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    },

    lisi() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNLMwNzWwNDQy11EqLU4t8kxRsjKBMPMSc1OBWnIyizOVagFGKRpTQQAAAA.OEdl2cotE345b7rW-CK02bgLQMQbhItr_nD9xd1amEIRLFW_5tr7_TKq5CTQZlD3B3Pvra8ebr21pBGhn5rYNw'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    }
  }
}
</script>
